:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color: #213547;
  background-color: #f0f2f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* 防止出现滚动条 */
}

#root {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* 确保root元素不会产生滚动条 */
}

/* 全局滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f0f2f5;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background-color: #d9d9d9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #bfbfbf;
}

/* 确保表格组件正确显示 */
.ant-table-wrapper {
  overflow-x: auto;
}

/* 确保表单在长页面中正确显示 */
.ant-form {
  margin-bottom: 24px;
}

a {
  font-weight: 500;
  color: #1890ff;
  text-decoration: inherit;
}
a:hover {
  color: #40a9ff;
}

button {
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: all 0.3s;
}
button:hover {
  border-color: #1890ff;
}
button:focus,
button:focus-visible {
  outline: 2px auto #1890ff;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

/* 修复某些高度较大组件的滚动问题 */
.height-limited-container {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #f0f2f5;
  }
  a:hover {
    color: #40a9ff;
  }
  button {
    background-color: #f9f9f9;
  }
}
